<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>生成试卷</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <h1>生成试卷</h1>
    <form method="post">
        <div class="form-group">
            <label for="title">试卷标题:</label>
            <input type="text" id="title" name="title" required>
        </div>
        <div class="form-group">
            <label for="description">试卷描述:</label>
            <textarea id="description" name="description" rows="4"></textarea>
        </div>
        <div class="form-group">
            <label for="question_count">题目数量:</label>
            <input type="number" id="question_count" name="question_count" required>
        </div>
        <div class="form-group">
            <input type="checkbox" id="randomize" name="randomize">
            <label for="randomize">随机抽题</label>
        </div>
        <div class="form-group">
            <label for="questions">选择题目:</label>
            <div>
                {% for question in questions %}
                <input type="checkbox" name="question_ids" value="{{ question.id }}"> {{ question.question_text }}<br>
                {% endfor %}
            </div>
        </div>
        <button type="submit">生成试卷</button>
     <div class="generate-exam-button">
        <form action="{{ url_for('exam_list') }}" method="GET">
            <button type="submit" class="primary-btn">生成试卷</button>
        </form>
    </div>
    </form>
</body>
</html>
